package com.his.controller;

import com.his.bean.DzmHisAuthGroup;
import com.his.service.DzmHisAuthGroupService;
import com.his.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/system/dzmhisauthgroup")
public class DzmHisAuthGroupController {

    @Autowired
    DzmHisAuthGroupService dzmHisAuthGroupService;

    @GetMapping("list")
    public ResponseResult groupList() {
        List<DzmHisAuthGroup> dzmHisAuthGroups = dzmHisAuthGroupService.groupList();
        return new ResponseResult(200,"成功",dzmHisAuthGroups);

    }

    @GetMapping("listbyid")
    public ResponseResult groupListid(String id){
        DzmHisAuthGroup dzmHisAuthGroup = dzmHisAuthGroupService.groupListid(id);
        return new ResponseResult(200,"ok",dzmHisAuthGroup);
    }

}
